package com.lifa.dao;

import com.lifa.entity.Userinfo;
import com.lifa.entity.Userinfo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
/**
 * 123
 */
public interface UserInfoDao {
    public Userinfo login(@Param("username") String username, @Param("pwd") String pwd) ;
    public List<Userinfo> queryAll() ;
    public long getTotalCount(@Param("username") String username) ;
    public List<Userinfo> query(@Param("username") String username, @Param("offset") int offset, @Param("limit") int limit) ;
    /**
     * 添加用户信息
     * @param
     * @return
     */
    public int insUserInfo(@Param("username")String username,@Param("workname") String workname,@Param("sex") String sex, @Param("phone")String phone,@Param("pwd") String pwd,@Param("nativeplace")String nativeplace,@Param("borndate") String borndate,@Param("mountguarddate")String  mountguarddate,@Param("state")long state);

    /**
     * 根据id查找信息
     * @param id
     * @return
     */
    public Userinfo selUserInfoById(int id);

    /**
     * 修改
     * @param
     * @return
     */
    public int updUserInfo(@Param("id") long id, @Param("username")String username,@Param("workname") String workname,@Param("sex") String sex, @Param("phone")String phone,@Param("pwd") String pwd,@Param("nativeplace")String nativeplace,@Param("borndate") String borndate,@Param("mountguarddate")String  mountguarddate,@Param("state")long state);

    /**
     * 删除信息
     * @param id
     * @return
     */
    public int delUserInfo(int id);
}
